package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.BizAnhuanZicanDetailsMapper;
import com.aidex.biz.domain.BizAnhuanZicanDetails;
import com.aidex.biz.service.BizAnhuanZicanDetailsService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 安环资产详情Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-04-27
 */
@Service
@Transactional(readOnly = true)
public class BizAnhuanZicanDetailsServiceImpl extends BaseServiceImpl<BizAnhuanZicanDetailsMapper, BizAnhuanZicanDetails> implements BizAnhuanZicanDetailsService
{
    private static final Logger log = LoggerFactory.getLogger(BizAnhuanZicanDetailsServiceImpl.class);

    /**
     * 获取单条数据
     * @param bizAnhuanZicanDetails 安环资产详情
     * @return 安环资产详情
     */
    @Override
    public BizAnhuanZicanDetails get(BizAnhuanZicanDetails bizAnhuanZicanDetails)
    {
        BizAnhuanZicanDetails dto = super.get(bizAnhuanZicanDetails);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 安环资产详情id
     * @return 安环资产详情
     */
    @Override
    public BizAnhuanZicanDetails get(String id)
    {
        BizAnhuanZicanDetails dto = super.get(id);
        return dto;
    }


    /**
     * 查询安环资产详情列表
     * @param bizAnhuanZicanDetails 安环资产详情
     * @return 安环资产详情
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<BizAnhuanZicanDetails> findList(BizAnhuanZicanDetails bizAnhuanZicanDetails)
    {
        return super.findList(bizAnhuanZicanDetails);
    }

    /**
     * 分页查询安环资产详情列表
     * @param bizAnhuanZicanDetails 安环资产详情
     * @return 安环资产详情
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<BizAnhuanZicanDetails> findPage(BizAnhuanZicanDetails bizAnhuanZicanDetails)
    {
        return super.findPage(bizAnhuanZicanDetails);
    }

    /**
     * 保存安环资产详情
     * @param bizAnhuanZicanDetails
     * @return 结果
     */
    @Override
    public boolean save(BizAnhuanZicanDetails bizAnhuanZicanDetails)
    {
        return super.save(bizAnhuanZicanDetails);
    }


    /**
     * 删除安环资产详情信息
     * @param bizAnhuanZicanDetails
     * @return 结果
     */
    @Override
    public boolean remove(BizAnhuanZicanDetails bizAnhuanZicanDetails)
    {
        return super.remove(bizAnhuanZicanDetails);
    }

    /**
     * 批量删除安环资产详情
     * @param ids 需要删除的安环资产详情ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBizAnhuanZicanDetailsByIds(String[] ids)
    {
        return mapper.deleteBizAnhuanZicanDetailsByIds(ids);
    }

    /**
     * 获取最大编号
     * @param bizAnhuanZicanDetails 安环资产详情
     * @return 结果
     */
    @Override
    public int findMaxSort(BizAnhuanZicanDetails bizAnhuanZicanDetails)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(bizAnhuanZicanDetails));
    }
}
